import fetch from 'src/fetch'
import * as userUrl from '../constant/user'

// 登录
export const login = (data) => {
  return fetch({
    url: userUrl.login,
    method: 'post',
    data
  })
}
// 登出
export const logout = () => {
  return fetch({
    url: userUrl.logout,
    method: 'post'
  })
}

//注册
export const register = (data) => {
  return fetch({
    url: userUrl.register,
    method: 'post',
    data
  })
}

//企业认证
export const apiUserinfoCorpAuth = (data) => {
  return fetch({
    url: userUrl.apiUserinfoCorpAuth,
    method: 'post',
    data
  })
}

// 个人信息
export const test = () => {
  return fetch({
    url: userUrl.apiUserinfo,
    method: 'get'
  })
}




// 首页模块

//首页banner及文章列表-ok
export const apiIndex = () => {
  return fetch({
    url: userUrl.apiIndex,
    method: 'post',
  })
}
//4大内容块(方案/案例/项目/设备)
export const apiIndexContent = () => {
  return fetch({
    url: userUrl.apiIndexContent,
    method: 'post',
  })
}
//热词
export const apiIndexHotkey = () => {
  return fetch({
    url: userUrl.apiIndexHotkey,
    method: 'post',
  })
}
//搜索类型下拉列表
export const apiIndexTypes = () => {
  return fetch({
    url: userUrl.apiIndexTypes,
    method: 'post',
  })
}

//找回密码-发送验证码
export const apiSendFindpwdSMSCode = (data) => {
  return fetch({
    url: userUrl.apiSendFindpwdSMSCode,
    method: 'post',
    data
  })
}

//修改登录密码
export const apiChangePassword = (data) => {
  return fetch({
    url: userUrl.apiChangePassword,
    method: 'post',
    data
  })
}

//------- 商城-成功案例、解决方案、项目服务、产品设备、供应商广场、需求广场
// 成功案例
export const apiContentCase = (data) => {
  return fetch({
    url: userUrl.apiContentCase,
    method: 'post',
    data
  })
}
//成功案例页面-热词
export const apiContentCaseHotkey = (data) => {
  return fetch({
    url: userUrl.apiContentCaseHotkey,
    method: 'post',
    data
  })
}
// 设备类型
export const apiContentCodesDevice = () => {
  return fetch({
    url: userUrl.apiContentCodesDevice,
    method: 'post',
  })
}
// 应用行业类型
export const apiContentCodesIndustry = () => {
  return fetch({
    url: userUrl.apiContentCodesIndustry,
    method: 'post',
  })
}
// 专业类型
export const apiContentCodesProfession = () => {
  return fetch({
    url: userUrl.apiContentCodesProfession,
    method: 'post',
  })
}
// 项目类型
export const apiContentCodesProject = () => {
  return fetch({
    url: userUrl.apiContentCodesProject,
    method: 'post',
  })
}
// 供应商广场
export const apiContentCorp = (data) => {
  return fetch({
    url: userUrl.apiContentCorp,
    method: 'post',
    data
  })
}
// 供应商广场页面-热词
export const apiContentCorporationHotkey = () => {
  return fetch({
    url: userUrl.apiContentCorporationHotkey,
    method: 'post',
  })
}
// 产品设备
export const apiContentDevice = (data) => {
  return fetch({
    url: userUrl.apiContentDevice,
    method: 'post',
    data
  })
}

// 产品设备页面-热词
export const apiContentDeviceHotkey = () => {
  return fetch({
    url: userUrl.apiContentDeviceHotkey,
    method: 'post',
  })
}
// 项目服务
export const apiContentProject = (data) => {
  return fetch({
    url: userUrl.apiContentProject,
    method: 'post',
    data
  })
}
// 项目服务页面-热词
export const apiContentProjectHotkey = () => {
  return fetch({
    url: userUrl.apiContentProjectHotkey,
    method: 'post',
  })
}

// 需求广场
export const apiContentCequirement = (data) => {
  return fetch({
    url: userUrl.apiContentCequirement,
    method: 'post',
    data
  })
}
// 需求广场--热闹
export const apiContentRequirementHotkey = () => {
  return fetch({
    url: userUrl.apiContentRequirementHotkey,
    method: 'POST',
  })
}

// 解决方案
export const apiContentSolution = (data) => {
  return fetch({
    url: userUrl.apiContentSolution,
    method: 'post',
    data
  })
}
// 解决方案页面-热词
export const apiContentSolutionHotkey = (data) => {
  return fetch({
    url: userUrl.apiContentSolutionHotkey,
    method: 'post',
    data
  })
}
//供应商点击验证
export const apiCorpAudit = () => {
  return fetch({
    url: userUrl.apiCorpAudit,
    method: 'post',
  })
}

//供应商主页
export const apiCorpInfo = () => {
  return fetch({
    url: userUrl.apiCorpInfo,
    method: 'post',
  })
}
//修改基本情况
export const apiCorpBase = () => {
  return fetch({
    url: userUrl.apiCorpBase,
    method: 'post',
  })
}
//联系人列表
export const apiCorpContacts = () => {
  return fetch({
    url: userUrl.apiCorpContacts,
    method: 'post',
  })
}
//修改公司介绍
export const apiCorpDescription = () => {
  return fetch({
    url: userUrl.apiCorpDescription,
    method: 'post',
  })
}
//修改logo及名称
export const apiCorpLogoAndName = () => {
  return fetch({
    url: userUrl.apiCorpLogoAndName,
    method: 'post',
  })
}
//修改业务范围
export const apiCorpScope = () => {
  return fetch({
    url: userUrl.apiCorpScope,
    method: 'post',
  })
}
//新增/更新-成功案例
export const apiCorpCaseCu = (data) => {
  return fetch({
    url: userUrl.apiCorpCaseCu,
    method: 'post',
    data
  })
}
//查询-成功案例
export const apiCorpCases = () => {
  return fetch({
    url: userUrl.apiCorpCases,
    method: 'post',
  })
}
//删除-成功案例
export const apiCorpCasesDelete = (data) => {
  return fetch({
    url: userUrl.apiCorpCasesDelete,
    method: 'post',
    data
  })
}
//发布/下架-成功案例
export const apiCorpCasesPublish = () => {
  return fetch({
    url: userUrl.apiCorpCasesPublish,
    method: 'post',
  })
}
//查询-产品设备
export const apiCorpDevice = () => {
  return fetch({
    url: userUrl.apiCorpDevice,
    method: 'post',
  })
}
//新增/更新-产品设备
export const apiCorpDeviceCu = () => {
  return fetch({
    url: userUrl.apiCorpDeviceCu,
    method: 'post',
  })
}
//删除-产品设备
export const apiCorpDeviceDelete = () => {
  return fetch({
    url: userUrl.apiCorpDeviceDelete,
    method: 'post',
  })
}
//发布/下架-产品设备
export const apiCorpDevicePublish = () => {
  return fetch({
    url: userUrl.apiCorpDevicePublish,
    method: 'post',
  })
}

//查询-项目服务
export const apiCorpProject = () => {
  return fetch({
    url: userUrl.apiCorpProject,
    method: 'post',
  })
}
//新增/更新-项目服务
export const apiCorpProjectCu = () => {
  return fetch({
    url: userUrl.apiCorpProjectCu,
    method: 'post',
  })
}
//删除-项目服务
export const apiCorpProjectDelete = () => {
  return fetch({
    url: userUrl.apiCorpProjectDelete,
    method: 'post',
  })
}

//发布/下架-项目服务
export const apiCorpProjectPublish = () => {
  return fetch({
    url: userUrl.apiCorpProjectPublish,
    method: 'post',
  })
}

//查询-解决方案
export const apiCorpSolution = () => {
  return fetch({
    url: userUrl.apiCorpSolution,
    method: 'post',
  })
}
//新增/更新-解决方案
export const apiCorpSolutionCu = () => {
  return fetch({
    url: userUrl.apiCorpSolutionCu,
    method: 'post',
  })
}
//删除-解决方案
export const apiCorpSolutionDelete = () => {
  return fetch({
    url: userUrl.apiCorpSolutionDelete,
    method: 'post',
  })
}

//发布/下架-解决方案
export const apiCorpSolutionPublish = () => {
  return fetch({
    url: userUrl.apiCorpSolutionPublish,
    method: 'post',
  })
}
//详情-成功案例
export const apiCorpCasesDetail = (data) => {
  return fetch({
    url: userUrl.apiCorpCasesDetail,
    method: 'post',
    data
  })
}

//文章详情
export const apiArticleDetail = (data) => {
  return fetch({
    url: userUrl.apiArticleDetail,
    method: 'post',
    data
  })
}
